import { inject, injectable } from "inversify";
import { Event, EventEmitter, Uri } from "vscode";
import { IWorkspaceService } from "../../common/application/types";
import '../../common/extension';
import { IFileSystem } from "../../common/platform/types";
import { IPersistentStateFactory, Resource } from "../../common/types";
import { EQEnvironment } from "../../eqEnvironments/info";
import { IInterpreterComparer } from "../configuration/types";
import { IInterpreterHelper, IInterpreterService } from "../contracts";
import { IInterpreterAutoSelectionProxyService, IInterpreterAutoSelectionService } from "./types";


@injectable()
export class InterpreterAutoSelectionService implements IInterpreterAutoSelectionService {

    private readonly didAutoSelectedInterpreterEmitter = new EventEmitter<void>();

    constructor(
        @inject(IWorkspaceService) private readonly workspaceService: IWorkspaceService,
        @inject(IPersistentStateFactory) private readonly stateFactory: IPersistentStateFactory,
        @inject(IFileSystem) private readonly fs: IFileSystem,
        @inject(IInterpreterService) private readonly interpreterService: IInterpreterService,
        @inject(IInterpreterComparer) private readonly envTypeComparer: IInterpreterComparer,
        @inject(IInterpreterAutoSelectionProxyService) proxy: IInterpreterAutoSelectionProxyService,
        @inject(IInterpreterHelper) private readonly interpreterHelper: IInterpreterHelper,
    ) {
        proxy.registerInstance!(this);
    }
    public get onDidChangeAutoSelectedInterpreter(): Event<void> {
        return this.didAutoSelectedInterpreterEmitter.event;
    }
    autoSelectInterpreter(resource: Resource): Promise<void> {
        throw new Error("37Method not implemented.");
    }
    getAutoSelectedInterpreter(resource: Resource): EQEnvironment | undefined {
        throw new Error("38Method not implemented.");
    }
    setGlobalInterpreter(interpreter: EQEnvironment | undefined): Promise<void> {
        throw new Error("39Method not implemented.");
    }
    setWorkspaceInterpreter(resource: Uri, interpreter: EQEnvironment | undefined): Promise<void> {
        throw new Error("40Method not implemented.");
    }
}